﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>PagerTree 树形分页表格</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link href="../demo.css" rel="stylesheet" type="text/css" />

    <script src="../../scripts/boot.js" type="text/javascript"></script>
    <script src="pagertree.js" type="text/javascript"></script>
    
</head>
<body>
    <h1>PagerTree 树形分页表格</h1>
    
    任务名称：<input id="key"/><input type="button" value="查找" onclick="search()"/>



<div id="treegrid1" class="mini-pagertree" style="width:700px;height:280px;" allowResize="true" 
    url="treeload.jsp" idField="UID" treeColumn="taskname" pageSize="20"
>
    <div property="columns">
        <div type="indexcolumn"></div>
        <div name="taskname" field="Name" width="160" >任务名称</div>
        <div field="PercentComplete" width="80">进度</div>
        <div field="Duration" width="60" align="right">工期</div>
        <div field="Start" width="80" dateFormat="yyyy-MM-dd">开始日期</div>
        <div field="Finish" width="80" dateFormat="yyyy-MM-dd">完成日期</div>                   
    </div>
</div>
<script>
    mini.parse();
    var tree = mini.get("treegrid1");
    var treeid = '1';
    tree.load({
        id: treeid
    });

    function search() {
        var key = document.getElementById('key').value;
        tree.load({
            id: treeid,
            name: key
        });
    }
</script>

</body>
</html>
